package com.kingbi.system.roleFunction.model;

import com.kingbi.system.function.model.FunctionModel;
import com.kingbi.system.role.model.RoleModel;


/**
 * RoleFunctionModelId entity. @author MyEclipse Persistence Tools
 */

public class RoleFunctionModelId  implements java.io.Serializable {


    // Fields    

     private RoleModel roleModel;
     private FunctionModel functionModel;


    // Constructors

    /** default constructor */
    public RoleFunctionModelId() {
    }

    
    /** full constructor */
    public RoleFunctionModelId(RoleModel roleModel, FunctionModel functionModel) {
        this.roleModel = roleModel;
        this.functionModel = functionModel;
    }

   
    // Property accessors

    public RoleModel getRoleModel() {
        return this.roleModel;
    }
    
    public void setRoleModel(RoleModel roleModel) {
        this.roleModel = roleModel;
    }

    public FunctionModel getFunctionModel() {
        return this.functionModel;
    }
    
    public void setFunctionModel(FunctionModel functionModel) {
        this.functionModel = functionModel;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof RoleFunctionModelId) ) return false;
		 RoleFunctionModelId castOther = ( RoleFunctionModelId ) other; 
         
		 return ( (this.getRoleModel()==castOther.getRoleModel()) || ( this.getRoleModel()!=null && castOther.getRoleModel()!=null && this.getRoleModel().equals(castOther.getRoleModel()) ) )
 && ( (this.getFunctionModel()==castOther.getFunctionModel()) || ( this.getFunctionModel()!=null && castOther.getFunctionModel()!=null && this.getFunctionModel().equals(castOther.getFunctionModel()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getRoleModel() == null ? 0 : this.getRoleModel().hashCode() );
         result = 37 * result + ( getFunctionModel() == null ? 0 : this.getFunctionModel().hashCode() );
         return result;
   }   





}